* nsterm.m (ns_select): Count fd:s in writefs also.
authorJan D. <jan.h.d@swipnet.se>
Sun, 14 Oct 2012 18:28:48 +0000 (20:28 +0200)
committerJan D. <jan.h.d@swipnet.se>
Sun, 14 Oct 2012 18:28:48 +0000 (20:28 +0200)
src/ChangeLog
src/nsterm.m

index 4e8d34423f3e2ecb1cd71cf6c2fd09a64b4ab9b8..b344b6fde30c360b37f2496b41afe289d6b5bcfa 100644 (file)
@@ -1,3 +1,7 @@
+2012-10-14  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
+
 2012-10-13  Jan Djärv  <jan.h.d@swipnet.se>
 
        * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
index 98dd0a8aab103bcf7fdc124e36ddbf8cbe343677..dfc84db50f7e9fab223f02f1b415a3076d984e6f 100644 (file)
@@ -3444,7 +3444,10 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
 /*  NSTRACE (ns_select); */
 
   for (k = 0; readfds && k < nfds+1; k++)
-    if (FD_ISSET(k, readfds)) ++nr;
+    {
+      if (FD_ISSET(k, readfds)) ++nr;
+      if (FD_ISSET(k, writefds)) ++nr;
+    }
 
   if (NSApp == nil
       || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0))